/*package com.hotvoice.android.task;

import android.app.Application;
import android.content.Context;
import android.content.res.Resources;
import android.os.PowerManager;
import android.os.PowerManager.WakeLock;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

import com.hotvoice.android.MainActivity;
import com.hotvoice.android.service.CallService;

public class VoiceRecorderApp extends Application
{
  public static String dataPath = "/data";
  CallService callService = null;
  MainActivity mainActivity = null;
  private PowerManager powerManager = null;
  private PowerManager.WakeLock wakeLock = null;

  public void aquireWakeLock()
  {
    this.wakeLock.acquire();
  }

  public String copyBinary(String paramString, int paramInt)
  {
    File localFile = new File(paramString);
    InputStream localInputStream = getResources().openRawResource(paramInt);
    int i = 1024;
    byte[] arrayOfByte = new byte[i];
    try
    {
      FileOutputStream localFileOutputStream = new FileOutputStream(localFile);
      while (true)
      {
        int j = localInputStream.read(arrayOfByte);
        if (j <= 0)
        {
          localFileOutputStream.close();
          localInputStream.close();
          i = 0;
          return i;
        }
        i = null;
        localFileOutputStream.write(arrayOfByte, i, j);
      }
    }
    catch (IOException localIOException)
    {
      while (true)
        String str = "Couldn't install file - " + paramString + "!";
    }
  }

  public CallService getCallService()
  {
    return this.callService;
  }

  public MainActivity getMainActivity()
  {
    return this.mainActivity;
  }

  public int installFiles()
  {
    String str1 = String.valueOf(dataPath);
    Object localObject = str1 + "/bin";
    File localFile = new File((String)localObject);
    localObject = localFile.exists();
    if (localObject == 0)
      localFile.mkdir();
    localObject = NativeTask.file_path;
    localFile = new File((String)localObject);
    localObject = localFile.exists();
    if (localObject == 0)
    {
      localObject = localFile.mkdir();
      if (localObject == 0)
        localObject = null;
    }
    while (true)
    {
      return localObject;
      String str2 = String.valueOf(dataPath);
      localObject = str2 + "/bin/vrcontrol";
      copyBinary((String)localObject, 2131034116);
      String str3 = String.valueOf(dataPath);
      localObject = str3 + "/bin/airvoice";
      copyBinary((String)localObject, 2131034112);
      String str4 = String.valueOf(dataPath);
      localObject = str4 + "/bin/pcm2wav";
      copyBinary((String)localObject, 2131034114);
      String str5 = String.valueOf(dataPath);
      localObject = str5 + "/bin/voiceplayback";
      copyBinary((String)localObject, 2131034115);
      String str6 = String.valueOf(dataPath);
      localObject = str6 + "/files/myvoice.pcm";
      copyBinary((String)localObject, 2131034113);
      VoiceRecorderApp.1 local1 = new VoiceRecorderApp.1(this);
      new Thread(local1).start();
      int i = 1;
    }
  }

  public void onCreate()
  {
    dataPath = getApplicationContext().getFilesDir().getParent();
    String str = String.valueOf(dataPath);
    NativeTask.cmd_path = str + "/bin";
    PowerManager localPowerManager = (PowerManager)getSystemService("power");
    this.powerManager = localPowerManager;
    PowerManager.WakeLock localWakeLock = this.powerManager.newWakeLock(1, "AIRVOICE_WAKE_LOCK");
    this.wakeLock = localWakeLock;
    this.wakeLock.setReferenceCounted(null);
    super.onCreate();
  }

  public void releaseWakeLock()
  {
    this.wakeLock.release();
  }

  public void setCallService(CallService paramCallService)
  {
    this.callService = paramCallService;
  }

  public void setMainActivity(MainActivity paramMainActivity)
  {
    this.mainActivity = paramMainActivity;
  }
}

*/